<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8" />
    <title>数组方法</title>
</head>
<body>
    <script>

        //typeof判断数组为object,这是不准确的
        //判断是否为数组,用Array.isArray();
        //Array.isArray()的返回值为布尔类型

        var arr = ["lisi",18,"男",180];
        console.log(typeof(arr));//object
        console.log(Array.isArray(arr));//True
        var arr2 = {};
        console.log(Array.isArray(arr2));
        

    </script>
</body>
</html>